package model;


public class BetContainer extends ChipsContainer
{
	private int bet;
    
	private int stateBet;
	
	public void setStateBet(int amount)
	{
		stateBet = amount;
	}
	
	public void addStateBet(int amount)
	{
		stateBet += amount;
	}

	public void removeStateBet(int amount)
	{
		stateBet -= amount;
		
		if (stateBet < 0)
		{
			stateBet = 0;
		}
	}
	
	public int getStateBet()
	{
		return stateBet;
	}
	
	public void setBet(int amount)
	{
		bet = amount;
	}
	
	public void addBet(int amount)
	{
		bet += amount;
	}

	public void removeBet(int amount)
	{
		bet -= amount;
		
		if (bet < 0)
		{
			bet = 0;
		}
	}
	
	public int getBet()
	{
		return bet;
	}
	
	public void allIn()
	{
		addStateBet(getChips());
		
		setChips(0);
	}
	
	public boolean isAllIn()
	{
		return chips == 0;
	}
}
